
import 'package:Smart/pages/productor007/studytest/widgetStudy/CustomScrollViewExample.dart';
import 'package:Smart/res/colors_res.dart';
import 'package:Smart/utils/routers/page_jump_service.dart';
import 'package:flutter/material.dart';

class WidgetStudy extends StatefulWidget {

  final String name;
  WidgetStudy(this.name);

  @override
  _WidgetStudy createState() => _WidgetStudy();
}

class _WidgetStudy extends State<WidgetStudy> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        leading: GestureDetector(
          onTap: () {
            PageJumpService.instance().goBack();
          },
          child: Icon(
            Icons.arrow_back_ios,
            size: 20,
            color: Color(0XFF231815),
          ),
        ),
        backgroundColor: ColorsRes.color_ffffff,
        title: Text(
          "${widget.name}- 学习练习",
          style: TextStyle(color: ColorsRes.color_000000),
        ),
      ),
      body:Column(
          children: [
            Container(
              margin: EdgeInsets.only(top: 10,left: 10,right: 10),
              child:Row(
                mainAxisAlignment: MainAxisAlignment.spaceAround,
                children: [
                  InkWell(
                    child: Container(
                      alignment: Alignment.center,
                      padding: EdgeInsets.only(
                          top: 5, right: 10, bottom: 6, left: 10),
                      decoration: BoxDecoration(
                          border: Border.all(width: 1, color: Colors.green),
                          borderRadius: BorderRadius.all(Radius.circular(10))),
                      child: Text("CustomScrollView学习"),
                    ),
                    onTap: () {
                      PageJumpService.instance().goTo(CustomScrollViewExample("CustomScrollView"));
                      print("点击了CustomScrollView学习");
                    },
                  ),
                  InkWell(
                    child: Container(
                      alignment: Alignment.center,
                      padding: EdgeInsets.only(
                          top: 5, right: 10, bottom: 6, left: 10),
                      decoration: BoxDecoration(
                          border: Border.all(width: 1, color: Colors.green),
                          borderRadius: BorderRadius.all(Radius.circular(10))),
                      child: Text("bloc计算器"),
                    ),
                    onTap: () {
                      PageJumpService.instance().goTo(CustomScrollViewExample("CustomScrollView"));
                      print("点击了bloc计算器");
                    },
                  ),
                ],
              ),
            )
          ],
        )
      //  Center(
      //    // child:Text("练习主入口页面，请自己定制！")
      // ),
    );
  }
}
